// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from "element-ui"
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import $ from "jquery" 
import qs from "qs"
import '@/assets/css/global.css'
import SlideVerify from 'vue-monoplasty-slide-verify';

import{Message} from "element-ui"
import TreeTable from 'vue-table-with-tree-grid'
import VueCookies from 'vue-cookies'
//vuecookies
Vue.use(VueCookies)
//树形插件
Vue.component('tree-table', TreeTable)
Vue.prototype.$qs = qs;
Vue.prototype.$message = Message
//滑动验证
Vue.use(SlideVerify);
//axios的基本路径
axios.defaults.baseURL="http://127.0.0.1/"
//添加axios的请求头
axios.interceptors.request.use(config =>{
  config.headers.AdminToken =  '8401819d-bdb9-4603-9f41-7103e2501ca81614951079099'
  config.headers.Token =window.sessionStorage.getItem("token")
  
  return config
})


Vue.prototype.$ = $
Vue.prototype.$axios = axios
Vue.config.productionTip = false

Vue.config.productionTip = false
Vue.use(ElementUI)
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  data:function(){
    return {
        AdminToken: '8401819d-bdb9-4603-9f41-7103e2501ca81614951079099',
    }},
  components: { App },
  template: '<App/>',
  render: h => h(App)
})
